from selenium import webdriver
driver=webdriver.Firefox()
#定义父类，包括打开和关闭浏览器操作
class BaseClass:
    def open_browser(self,url):
        driver.get(url)
    def close_browser(self):
        driver.quit()
    #定位页面元素的方法
    def location(self,l_type,l_ele):
        myelement=driver.find_element(l_type,l_ele)
        return myelement